<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            /* 设置当前网页的视距为800px,人眼距离网页的距离 */
            perspective: 800px;
        }
        body{
            border:1px red solid;
            background-color: rgb(241,241,241);
        }
        .box1{
            width: 200px;
            height: 200px;
            background-color: #bfa;
            margin: 200px auto;
        
             transition: 2s;
        }
        body:hover .box1{
           /* 
            通过旋转可以使元素沿着x y或 z 旋转指定的角度
            rotateX()
            rotateY()
            rotateZ()

           */
           /* transform: rotateZ(90deg); */
           /* transform: rotateY(180deg) translateZ(400px); */
           /* transform: translateZ(400px) rotate(180deg); */
           transform: rotateY(180deg);
           /* 是否显示元素的背面 */
           backface-visibility: hidden;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
</body>
</html>